

public class AObserver extends Observer{
    public AObserver(ISubject subject){
        this.subject = subject;
        this.subject.attach(this);
    }
    @Override
    public void update() {
        System.out.println("AObserver listened state update. "+this.subject.getState());
    }
}
